//
// Created by haoy on 2017/6/20.
//

#ifndef RTC_XSWITCH2_RTP_PACKET_FACTORY_HPP
#define RTC_XSWITCH2_RTP_PACKET_FACTORY_HPP

#include <cstdint>
#include <list>
#include <map>
#include <memory>

#include "codecs.hpp"
#include "rtp/rtp_map.hpp"
#include "rtp/rtp_packet.hpp"

class RtpFactory {
public:
    std::shared_ptr<RtpPacket> read(const uint8_t* data, const int size, rtc_codecs_t* codecs);
    std::shared_ptr<RtpPacket> allocate();
private:
    std::list<std::shared_ptr<RtpPacket>> packets_;
};

#endif //RTC_XSWITCH2_RTP_PACKET_FACTORY_HPP
